When a digital information signal is compressed for storage and/or transmission at a reduced bit rate, the samples of the information signal are often requantized using a reduced word length. Reducing the word length by which each of the samples is represented reduces the number of bits required to represent the information at the expense of an increase in quantizing errors. This requantizing is usually done linearly by uniformly distributing quantizing values corresponding to the available quantizing levels across the range of values of the information signal and requantizing each sample of the information signal to the closest quantizing value. The same technique may be used to requantize transform coefficients representing the information signal.
In some applications, such as the so-called ISO/MPEG layer three audio coding standard, the quantizing values corresponding to the available quantizing levels are distributed non-uniformly. Distributing the quantizing values non-uniformly allows certain values of the information signal to be quantized more accurately than other values. This provides better results than linear quantizing when, for example, the values that are quantized more accurately occur more frequently than the values that are quantized less accurately, or errors in the values that are quantized more accurately are more noticeable. Both of these possibilities may occur in low bit rate audio compression.
Many audio compression systems orthogonally transform the audio input signal into the frequency domain before quantizing. When this is done, small-amplitude spectral coefficients occur more frequently than large-amplitude spectral coefficients for most practical input signals. Additionally, because of the psychoacoustic phenomenon of simultaneous masking that occurs between the members of a group of contiguous spectral coefficients, noise due to quantizing errors is less likely to be heard in the presence of large-amplitude coefficients than in the presence of small-amplitude coefficients. For this reason, a non-linear quantizing scheme that concentrates more quantizing levels at small amplitudes can lead to a significant improvement in sound quality.
Non-linear quantizing is normally implemented by a applying linear quantizing to a non-linearized version of the data subject to quantizing. The data subject to quantizing are normally a block or set of data, such as a set of spectral coefficients, that are to be quantized using the same number of quantizing levels, or the same word length. In non-linear quantizing, the data subject to quantizing are pre-processed by a non-linear function, and the resulting pre-processed data are then quantized using uniformly-spaced quantizing values. Thus, if Qx! represents a linear quantizing of x, and f(x) is a non-linear function of x, then non-linear quantizing can be represented as Qf(x)!. This technique is specified by the ISO/MPEG layer three audio coding standard, for example.
FIG. 1 illustrates a known linear quantizing scheme Qx! having five quantizing levels. FIG. 1 shows the relationship between the data value x of the data subject to quantizing and the resulting quantizing levels. The five possible quantizing levels denoted by the circled integers above the horizontal axis. Each quantizing level has a corresponding quantizing value. For example, in FIG. 1, the quantizing level 2 has a quantizing value of 1.0, and the quantizing level -1 has a quantizing value of -0.5. The data value x of the data subject to quantizing and the quantizing level of the quantizing values are indicated in FIG. 1 by the values -1.0, -0.5, 0, 0.5, and 1.0 below the horizontal axis.
In the linear quantizing scheme illustrated in FIG. 1, the data value x is quantized to the quantizing level having a quantizing value that is closest to x. In FIG. 1, the decision values between adjacent quantizing values are indicated by broken lines. For example, the broken line D.sub.01 indicates the decision value between the quantizing values 0 and 0.5. Data values between adjacent decision values are all quantized to the same quantizing level, and hence to the same quantizing value.
The data values of the data subject to quantizing may be restricted to the range between -1.0 and 1.0. Alternatively, data may include data values outside this range, in which case, data values greater than the highest decision value D.sub.12 are quantized to the highest quantizing level and data values less than the least decision value D.sub.-1-2 are quantized to the lowest quantizing level. In the linear quantizing scheme illustrated in FIG. 1, the decision values fall half-way between the quantizing values as a result of the data values being quantized to the nearest quantizing value.
As mentioned above, a non-linear quantizing scheme can be implemented according to the prior art by first pre-processing or transforming the data subject to quantizing using a non-linear function, and then linearly quantizing the resulting pre-processed data. If f() is the non-linear function, and linear quantizing of x is expressed as Qx!, then non-linear quantizing of x may be expressed as Qf(x)!.
A block diagram of a prior art non-linear quantizer is shown in FIG. 2. In FIG. 2, the data subject to quantizing are fed via the input terminal 10 to the pre-processor 21, which, in this example, receives the non-linear function f() from the non-linear function block 23. The pre-processor pre-processes each of the data subject to quantizing according to the non-linear function received from the non-linear function block. The pre-processed data are fed from the pre-processor 21 to the linear quantizer 22. The linear quantizer 22 uses uniformly-spaced quantizing values set according to data received via the input terminal 11 indicating the number of quantizing levels. The linear quantizer 22 quantizes the pre-processed data to the nearest uniformly-spaced quantizing value and feeds the resulting non-linearly quantized data to the output terminal 14.
Note that linear quantizing is a special case of the non-linear quantizing just described. If the non-linear function f()is defined as f(x)=x, then the data are quantized linearly, as shown in FIG. 3. In FIG. 3, the data value a is first pre-processed by the linear function f(x)=x, and, and the resulting pre-processed data value a' on the vertical axis is then linearly quantized by Q!. Since the function f(x) is linear with a slope of 1.0, the result of Qf(x)! is the same as Qx!. In the example shown in FIG. 3, the pre-processed data value is greater than the decision value D.sub.12 between quantizing levels 1 and 2, so the data value a is quantized with a quantizing level of 2.
When f(x) is a non-linear function, the quantizing scheme Qf(x)! becomes a non-linear quantizing scheme according to the prior art. FIG. 4 shows an example of this form of non-linear quantizing. As in the example of linear quantizing described above with reference to FIG. 3, the data are pre-processed by the function f(x), and the pre-processed data are then quantized linearly in the non-linearized domain shown on the vertical axis in FIG. 4. However, in this case, the function f(x) is non-linear.
Pre-processing using the non-linear function f(x) has the effect of changing the quantizing value in the input domain (the horizontal axis in FIG. 4) of each of the quantizing levels. FIG. 5 shows the result of this effect. FIG. 5 illustrates the same quantizing scheme as FIG. 4 except that each quantizing value q has been inversely transformed back from the transformed domain (the vertical axis in FIG. 5) to the input domain (the horizontal axis) by the inverse g(q) of the non-linear function f(x). Thus, FIG. 5 shows the level in the input domain of the quantizing value of each quantizing level in the transformed domain. It can be seen that the quantizing values are uniformly spaced in the transformed domain, but are non-uniformly spaced in the input domain. Since, in this example, the slope of the non-linear function f(x) is greater for data values near zero than for data values near 1.0 and -1.0, the non-linear quantizing scheme shown is more precise for small data values.
FIG. 6 shows the quantizing values of FIG. 5 in the same format as FIG. 1, using only the input domain. FIG. 6 also shows the corresponding decision values. The decision values are calculated in the same way as the quantizing values are calculated in FIG. 5, i.e., by inversely transforming the decision values in the transformed domain, (the vertical axis of FIG. 5) back to the input domain (the horizontal axis of FIG. 5). It can be seen that the decision values are no longer located half-way between the quantizing values in the input domain. Because of this, certain data values may not be quantized with a minimum quantizing error.
The non-linear quantizer prescribed by the above-mentioned ISO/MPEG layer three audio coding standard has additional disadvantages. First, the quantizing effects of a given non-linear function f() vary according to the number of quantizing levels used to quantize the data values after they have been pre-processed according to the non-linear function f(). However, the quantizer prescribed by the standard changes the number of quantizing levels while using a fixed non-linear function f(). In a quantizer in which the number of quantizing levels changes dynamically, as in most high-efficiency compression systems, pre-processing using a fixed non-linear function f() will not give optimum results for all values of the number of quantizing levels.
Second, calculating f(x) for each of the data for the non-linear function f() may require too much time and/or signal processing power. To conserve time or processing power, the data values may have to be pre-processed using a simpler, but less optimum, non-linear function f().